<!--
 @description
 @fileName Banner.vue
 @author zengqiongying
 @created 2022/12/25 16:48:27
-->
<template>
  <div class="home-banner">
    <van-swipe class="banner-swiper" :autoplay="3000" loop indicator-color="white">
      <van-swipe-item v-for="(item,i) in list" :key="i">
        <img v-lazy="getImageUrl(item.pic)" @click="clickHandle(item)">
      </van-swipe-item>
    </van-swipe>
  </div>
</template>

<script>
import CommonMixin from './CommonMixin'
export default {
  name: 'HomeBanner',
  components: {

  },
  mixins: [CommonMixin],
  data() {
    return {

    }
  },

  methods: {
    getImageUrl(url) {
      return this.$formatURL(url, this.imgHost)
    }
  }
}

</script>
<style lang='less' scoped>
  .home-banner{
    background: #fff;
    .banner-swiper{
      height: 300px;
      // border-radius:10px;
      overflow: hidden;
      img{
        width: 100%;
        height: 300px;
        object-fit: cover;
      }
    }
    /deep/.van-swipe__indicators{
      bottom: 10px;
      .van-swipe__indicator{
        width: 6px;
        height: 3px;
        border-radius: 2px;
      }
    }
  }
</style>
